﻿using BCMongoEntity.TMS.Location.Horseman;
using MongoDB.Bson;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace BCMongoData.TMS.Location.Horseman
{
    public interface IHorsemanLocationMongoData
    {
        /// <summary>
        /// 更新指定的骑手位置信息
        /// </summary> 
        /// <param name="driver">骑手信息</param>
        /// <returns></returns>
        HorsemanLocationEntity Update(HorsemanLocationEntity driver);
        /// <summary>
        /// 获取附近几公里的骑手信息
        /// </summary>
        /// <param name="location">指定的经纬度位置</param>
        /// <param name="maxDistance">最大几公里</param>
        /// <param name="query"></param>
        /// <param name="projections"></param>
        /// <returns></returns>
        IEnumerable<HorsemanLocationEntity> GetGeoNearLocationsByCoordinate(double[] location, double maxDistance, List<BsonElement> query, List<BsonElement> projections);
        /// <summary>
        /// 获取骑手位置
        /// </summary>
        /// <param name="vehicleNo">车牌号</param>
        /// <returns></returns>
        Task<HorsemanLocationEntity> GetHorsemanLocationInfo(string vehicleNo);
    }
}
